<?php

namespace App\Http\Requests\AuthRequests;

use Illuminate\Foundation\Http\FormRequest;

class AvatarRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'avatar' => ['required','url'],
        ];
    }

    /**
     * @return array
     */
    public function messages()
    {
        return [
            'avatar.required' => __('头像必填'),
            'avatar.url' => __('格式错误'),
        ];
    }
}